package com.hdcircles.autoform.model.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by hdcircles on 2016/11/14.
 */

public class User implements Parcelable {

    private String Email;

    private String Password;

    private String Name;

    private String Photo;

    private boolean isSelected;

    private boolean isShared;



    public String getEmail() {
        return Email;
    }

    public void setEmail(String email) {
        this.Email = email;
    }

    public String getPassword() {
        return Password;
    }

    public void setPassword(String password) {
        this.Password = password;
    }

    public String getPhoto() {
        return Photo;
    }

    public void setPhoto(String photo) {
        this.Photo = photo;
    }

    public String getName() {
        return Name;
    }

    public void setName(String name) {
        this.Name = name;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    public boolean isShared() {
        return isShared;
    }

    public void setShared(boolean shared) {
        isShared = shared;
    }

    @Override
    public String toString() {
        return "User{" +
                "email='" + Email + '\'' +
                ", Password='" + Password + '\'' +
                ", Name='" + Name + '\'' +
                ", Photo='" + Photo + '\'' +
                '}';
    }


    public User() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.Email);
        dest.writeString(this.Password);
        dest.writeString(this.Name);
        dest.writeString(this.Photo);
        dest.writeByte(this.isSelected ? (byte) 1 : (byte) 0);
        dest.writeByte(this.isShared ? (byte) 1 : (byte) 0);
    }

    protected User(Parcel in) {
        this.Email = in.readString();
        this.Password = in.readString();
        this.Name = in.readString();
        this.Photo = in.readString();
        this.isSelected = in.readByte() != 0;
        this.isShared = in.readByte() != 0;
    }

    public static final Creator<User> CREATOR = new Creator<User>() {
        @Override
        public User createFromParcel(Parcel source) {
            return new User(source);
        }

        @Override
        public User[] newArray(int size) {
            return new User[size];
        }
    };
}
